<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <title>分享云微商城</title>

    <!-- css -->
    <link href="/Resource/css/bootstrap.min.css" rel="stylesheet">
    <link href="/Resource/css/all.css" rel="stylesheet">
    <script type="text/javascript" src="//libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="/Resource/js/common.js"></script>
    <script language='javascript' src='/Resource/js/jquery.cookie.js'></script>
    <script language='javascript' src='/Resource/js/wechat-useragent.js'></script>
</head>
<body>

<div class="main">
    <div class="container-fluid">
        <div class="row">
            <div class="col-xs-12 product-list pay">
                <div class="about">
                    <br><br>
                    <p>正在为您查询订单状态……</p>
                    <br>
                    <p>请别离开</p>
                    <br><br>
                    <span id="orderid">订单号:<?php echo ($orderid); ?></span>
                    <br><br>
                    <span>电话：0592-5793308</span>

                </div>
            </div>
        </div>
    </div>
</div>


<div class="main">
    <div class="container-fluid">
        <div class="row">
            <div class="col-xs-12 product-list" style="margin-top: 15px;">
                <div class="about">

                </div>
            </div>
        </div>
    </div>
</div>





<script type="text/javascript">

    removeGoodCookie();

    function removeGoodCookie() {
        var goodkeys = $.cookie('goodkeys');
        if(!isOwnEmpty(goodkeys) && typeof goodkeys != undefined && goodkeys != ""){
            var keys = goodkeys.split('@');
            for(var i=0;i<keys.length;i++) {
                var key = keys[i];
                $.removeCookie("select_"+key,{ path: '/' });
                $.removeCookie(key,{ path: '/' });
            }
        }
        $.removeCookie('goodkeys',{ path: '/' });
        $.removeCookie('buynow',{ path: '/' });
    }
    function myrefresh()
    {
        window.location.reload();
        refreshtime += 1;
        $.cookie('refreshtime',refreshtime,{ expires: 7, path: '/' });
    }

    var refreshtime = $.cookie('refreshtime');
    var from = $.cookie('lockfrom');

    if(isEmpty(refreshtime)){
        refreshtime = 0;
    }

    if (refreshtime <= 10) {
        if( '1' == "<?php echo ($paystatus); ?>" ){
            $.removeCookie('refreshtime',{ path: '/' });
            if(isEmpty(from) ){
                window.location = "/order/paysuccess";
            }else{
                window.location = "/order/paysuccess/from/"+from;
            }

        }else{
            setTimeout('myrefresh()',5000); //指定5秒后刷新
        }

    }else{
        $.removeCookie('refreshtime',{ path: '/' });
        if(isEmpty(from) ){
            window.location = "/order/payfail";
        }else{
            window.location = "/order/payfail/from/"+from;
        }

    }



</script>

</body>
</html>